1. Field of the Invention
The present invention relates to oscillator circuits which rely upon the charging and discharging time constants of a capacitor for determining the frequency of oscillation, and in particular, to the current processing circuits responsible for generating the charging and discharging currents.
2. Description of the Related Art
One commonly used type of oscillator circuit involves the generating of an alternating voltage by charging and discharging a capacitor between two fixed voltages using constant amounts of charging and discharging currents, respectively. This type of oscillator is often used to generate an on-chip oscillator signal. When the charging and discharging currents are both constant, the voltage waveform appearing across the capacitor has leading and trailing edges with respective constant slopes.
Referring to FIG. 1, this type of voltage waveform can be expressed in terms of the charging time T(charge) and discharging time T(discharge) according to the relationship between the oscillation period T, the capacitance value C of the capacitor, the corresponding current (Icharge or Idischarge) and the voltage V across the capacitor as represented below in Equations 1 and 2. ##EQU1##
In order to generate a very stable signal having an oscillation frequency which is independent of the environment, e.g., operating temperature and voltage, all of the variables in Equation 2 must be independent of such environment. While it is often relatively simple to obtain stable voltages V1, V2 and a stable capacitance value, as well as a stable source for the charging and discharging current Ist, delivery of this current Ist to the capacitor without adversely affecting the stability of such current Ist is quite difficult.
Referring to FIG. 2, a conventional circuit for conveying charging and discharging currents to the capacitor C uses two switching transistors SW(charge), SW(discharge) for turning on and off in accordance with mutually inverse phases of a clock signal to convey the charging and discharging currents to and from the capacitor C, respectively. For example, during the charging cycle, the charging switch SW(charge) is turned on and a charging current Ist is provided to the capacitor C while the discharge switch SW(discharge) is turned off. Conversely, during the discharge cycle, the discharge switch SW(discharge) is turned on, the charging switch SW(charge) is turned off and a discharge current Ist+Ierr is conveyed from the capacitor C.
This discharge current Ist+Ierr contains an error current component Ierr due to inaccuracies of the current sink circuit generating such discharge current. For example, such a current sink circuit involves the use of a current mirror circuit and, as is well known in the art, while a current mirror circuit may be designed to provide an output-to-input current ratio of one-to-one (1:1), truly precise ratios are virtually impossible to maintain. Hence, while it may be possible to generate substantially equal source currents Ist, replicating such a current Ist for use as a discharge current will include an error current component Ierr of some magnitude, however small.
The two environmental factors primarily responsible for the error current component Ierr are operating temperature and voltage. With respect to operating temperature, Equation 2, rewritten below as Equation 3 to include the error current component Ierr, can be solved to produce Equation 4. ##EQU2##
Making the assumption that the ratio of the error current component Ierr to the charging current Ist is much less than unity, i.e., Ierr/Ist &lt;&lt;1, Equation 4 can be approximated as shown below in Equation 5. ##EQU3##
Thus, the fractional error as a function of the operating temperature can be represented by Equation 6. ##EQU4##
With respect to operating voltage, it is first assumed that the error current component Ierr, as a function of the operating voltage, is proportional to the operating voltage V in accordance with a constant g as represented in Equation 7. EQU Ierr(V)=gV (7)
Now solving Equation 3 using the relationship in Equation 7 leads to the relationship expressed in Equation 8. ##EQU5##
This relationship can be simplified and approximated as represented below in Equation 9. ##EQU6##
Thus, in addition to the difference between the operating voltages V1, V2, the absolute values of such operating voltages V1, V2 also affect the frequency of oscillation (which is the inverse of the total time T for charging and discharging the capacitor C).
Accordingly, it would be desirable to have a charging and discharging current delivery circuit which is less dependent upon the environmental factors of operating temperature and voltages.